<template>
  <div>
    <div>
      <div class="headTitle">接触记录</div>
      <FilterTable
        ref="touchTable"
        :columns="touchColumns"
        :fetchapi="fetchApi"
        :params="fetchParams"
        :datakey="'records'"
        :isColumnFilter=false
        :isToperInfo=false
        :isSelectColumn=false
        :onColumnsChange="columns => this.columns = columns"
        :height=200
      />
      <div class="headTitle">关爱记录</div>
      <FilterTable
        ref="careTable"
        :columns="careColumns"
        :fetchapi="fetchApi"
        :params="fetchParams"
        :datakey="'records'"
        :isColumnFilter=false
        :isToperInfo=false
        :isSelectColumn=false
        :onColumnsChange="columns => this.columns = columns"
        :height=200
      />
    </div>

  </div>
</template>

<script>
import { dictionary } from '@/utils/dictMixin';
import { addBrand, updateBrand } from '@/api/common/cars/brandcarsModels';
import { getBrands } from '@/api/common/cars/brandcarsModels';

export default {
  name: 'DownfeedbackTouch',
  mixins: [dictionary],
  props: {
  },
  data() {
    return {
      fetchParams: {},
      fetchApi: getBrands,
      touchColumns: this.createTouchTableColumns(),
      careColumns: this.createCareTableColumns()
    }
  },
  computed: {
  },
  created() {
    this.init();
  },
  methods: {
    init() {

    },
    createTouchTableColumns() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 70,
          sorter: true,
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: '跟进人',
          dataIndex: 'followPersion'
        },
        {
          title: '跟进类型',
          dataIndex: 'followType'
        },
        {
          title: '跟进时间',
          dataIndex: 'followTime'
        },
        {
          title: '跟进目的',
          dataIndex: 'followGoal'
        },
        {
          title: '跟进经过',
          dataIndex: 'followProcess'
        },
        {
          title: '下次跟进时间',
          dataIndex: 'followNextTime'
        },
        {
          title: '是否预约',
          dataIndex: 'isAppointment'
        },
        {
          title: '预约进店时间',
          dataIndex: 'appointmentTime'
        },
        {
          title: '预约类型',
          dataIndex: 'appointmentType'
        },
        {
          title: '试驾车型',
          dataIndex: 'tryModel'
        },
        {
          title: '接待人',
          dataIndex: 'receiver'
        },
        {
          title: '下表类型',
          dataIndex: 'downType'
        },
        {
          title: '战败品牌',
          dataIndex: 'failBrand'
        },
        {
          title: '战败车系',
          dataIndex: 'failSeries'
        },
        {
          title: '下表备注',
          dataIndex: 'downNote'
        },
        {
          title: '下表外区域省市',
          dataIndex: 'downOutArea'
        },
        {
          title: '下表审核人',
          dataIndex: 'downAuditor'
        },
        {
          title: '下表审核时间',
          dataIndex: 'downAuditTime'
        },
        {
          title: '下表审核意见',
          dataIndex: 'downAuditOpinion'
        }
      ];
    },
    createCareTableColumns() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 70,
          sorter: true,
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: '关爱类型',
          dataIndex: 'careType'
        },
        {
          title: '关爱名称',
          dataIndex: 'careName'
        },
        {
          title: '关爱人',
          dataIndex: 'carePerson'
        },
        {
          title: '关爱内容',
          dataIndex: 'careContent'
        },
        {
          title: '整体满意度',
          dataIndex: 'satisfaction'
        },
        {
          title: '关爱方式',
          dataIndex: 'careWay'
        },
        {
          title: '关爱状态',
          dataIndex: 'careStatus'
        },
        {
          title: '关爱时间',
          dataIndex: 'careTime'
        }
      ];
    }
  }
};
</script>

<style lang="less" scoped>
  .headTitle{
    background: #f2f4f8;
    padding: 10px 0;
    margin-bottom: 10px;
    text-indent: 20px;
  }
</style>
